var arr=[1,2,3,4,{a:1}]
console.log(arr,'原数组');
// 将数组序列化 将数组转化为字符串并且以‘，’形式隔开
var result=arr.toString();
console.log(result,typeof result);
// join 
// var result1=arr.join('');1234[object Object] string
var result1=arr.join(',');//1,2,3,4,[object Object] string
console.log(result1,typeof result1);
var obj={
    name:'zhangsan'
}
console.log(obj,toString());